package weka.classifiers.trees;


import weka.classifiers.Classifier;
import weka.classifiers.RandomizableIteratedSingleClassifierEnhancer;
import weka.classifiers.trees.MseTrees.Tree;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.OptionHandler;
import weka.core.Utils;

public class MseTree extends Classifier  implements OptionHandler{
	private weka.classifiers.trees.MseTrees.Tree tree;
	protected int m_minNumInstances;
	/** a ZeroR model in case no model can be built from the data */
	protected Classifier m_Classifier;
	
	
	public int getM_minNumInstances() {
		return m_minNumInstances;
	}

	public void setM_minNumInstances(int m_minNumInstances) {
		this.m_minNumInstances = m_minNumInstances;
	}

	@Override
	public void buildClassifier(Instances data) throws Exception {
		// TODO Auto-generated method stub
		setM_minNumInstances(3);
		System.out.println("buildClassifier with parameters " +getM_minNumInstances() + " " + getM_Classifier());
		tree = new Tree(data,getM_minNumInstances());
			
			
	}
	
	public Classifier getM_Classifier() {
		return m_Classifier;
	}

	public MseTree() {
		super();
		
		m_Classifier = new weka.classifiers.functions.LinearRegression();
		
	}

	public void setM_Classifier(Classifier m_Classifier) {
		this.m_Classifier = m_Classifier;
	}

	@Override
	public double classifyInstance(Instance instance) throws Exception {

	    double maxProb = -1;
	   
	    return maxProb;      
	  }    

}
